package se.emilsjolander.flipview.slice;

import se.emilsjolander.flipview.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import se.emilsjolander.flipview.items.Items;
import se.emilsjolander.library.FlipView;
import se.emilsjolander.library.SimpleFoldShading;

public class MainAbilitySlice extends AbilitySlice {

  private FlipView flipView;

  @Override
  public void onStart(Intent intent) {
    super.onStart(intent);
    super.setUIContent(ResourceTable.Layout_ability_main);

    flipView = (FlipView) findComponentById(ResourceTable.Id_flip_view);
    flipView.setFoldShading(new SimpleFoldShading());
    flipView.setAdapter(new FlipView.FoldableAdapter(Items.getFoldableItems(getContext())));
  }

  @Override
  public void onActive() {
    super.onActive();
  }

  @Override
  public void onForeground(Intent intent) {
    super.onForeground(intent);
  }

}